﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RA.Common
{
    public class Settings
    {
        static Settings _default;
        public static Settings Default 
        {
            get
            {
             //   if (_default == null)
                {
                    _default = new Settings()
                    {
                        Method = EMethod.Линейный,
                        EqualizeHist = false,
                        NoiseFilter = false,
                        CannyThreshold = 50,
                        Blur = false,
                        AdaptiveThresholdBlockSize = 4,
                        AdaptiveThresholdParameter = 1.2d,
                        AddCanny = true,
                        FilterContoursBySize = true,
                        OnlyFindContours = false,
                        MinContourLength = 45,
                        MinContourArea = 40,
                        MinFormFactor = 0.5,
                    };
                }
                return _default;
            }
        }

        public static Settings Current = Default;


        public EMethod Method { get; set; }
        public bool EqualizeHist { get; set; }
        public bool NoiseFilter { get; set; }
        public int CannyThreshold { get; set; }
        public bool Blur { get; set; }
        public int AdaptiveThresholdBlockSize { get; set; }
        public double AdaptiveThresholdParameter { get; set; }
        public bool AddCanny { get; set; }
        public bool FilterContoursBySize { get; set; }
        public bool OnlyFindContours { get; set; }
        public int MinContourLength { get; set; }
        public int MinContourArea { get; set; }
        public double MinFormFactor { get; set; }
    }
}
